﻿namespace MingYuanyun.WebApi.Abstractions
{
    public class HttpRequestResult : HttpRequestResult<object>
    {
        public HttpRequestResult(object data = null, bool success = false, string message = null, string exception = null)
            : base(data, success, message, exception)
        {

        }
    }

    public class HttpRequestResult<T>
    {
        public HttpRequestResult(T data = default(T), bool success = false, string message = null, string exception = null)
        {
            Data = data;
            Success = success;
            Message = message ?? string.Empty;
            Exception = exception ?? string.Empty;
        }

        public T Data { get; private set; }

        public bool Success { get; private set; }

        public string Message { get; private set; }
        public string Exception { get; private set; }
    }
}
